package com.zxq.uart.controller;

import com.zxq.uart.frame.decoder._01PortStateResult;
import com.zxq.uart.frame.encoder._01ReadPortCmd;
import com.zxq.uart.result.ResultVO;
import com.zxq.uart.service.impl.PlatformExchange;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class _01PowerStateController extends PlatformExchange<_01ReadPortCmd, _01PortStateResult> {


    @Override
    public Integer getCmd() {
        return 1;
    }

    @PostMapping("exchange/01")
    @Override
    public ResultVO<_01PortStateResult> exchange(@RequestBody _01ReadPortCmd order) {
        return super.exchange(order);
    }

    @Override
    public _01PortStateResult getResult() {
        _01PortStateResult stateResult = new _01PortStateResult();
        return stateResult;
    }

}
